$OpenBSD: patch-qcadlib_src_gui_rs_graphicview_cpp,v 1.2 2010/06/07 20:08:09 kili Exp $
--- qcadlib/src/gui/rs_graphicview.cpp.orig	Tue Nov 22 12:52:28 2005
+++ qcadlib/src/gui/rs_graphicview.cpp	Mon Jun  7 21:46:08 2010
@@ -1740,75 +1740,117 @@ void RS_GraphicView::drawArcSmooth(const RS_Vector& ce
  */
 RS_LineTypePattern* RS_GraphicView::getPattern(RS2::LineType t) {
     switch (t) {
-    case RS2::SolidLine:
-        return &patternSolidLine;
+    case RS2::SolidLine: {
+            static RS_LineTypePattern patternSolidLine(1, 10.0);
+            return &patternSolidLine;
+        }
         break;
 
-    case RS2::DotLine:
-        return &patternDotLine;
+    case RS2::DotLine: {
+            static RS_LineTypePattern patternDotLine(2, 0.1, -6.2);
+            return &patternDotLine;
+        }
         break;
-    case RS2::DotLine2:
-        return &patternDotLine2;
+    case RS2::DotLine2: {
+            static RS_LineTypePattern patternDotLine2(2, 0.1, -3.1);
+            return &patternDotLine2;
+        }
         break;
-    case RS2::DotLineX2:
-        return &patternDotLineX2;
+    case RS2::DotLineX2: {
+            static RS_LineTypePattern patternDotLineX2(2, 0.1, -12.4);
+            return &patternDotLineX2;
+        }
         break;
 
-    case RS2::DashLine:
-        return &patternDashLine;
+    case RS2::DashLine: {
+            static RS_LineTypePattern patternDashLine(2, 12.0, -6.0);
+            return &patternDashLine;
+        }
         break;
-    case RS2::DashLine2:
-        return &patternDashLine2;
+    case RS2::DashLine2: {
+            static RS_LineTypePattern patternDashLine2(2, 6.0, -3.0);
+            return &patternDashLine2;
+        }
         break;
-    case RS2::DashLineX2:
-        return &patternDashLineX2;
+    case RS2::DashLineX2: {
+            static RS_LineTypePattern patternDashLineX2(2, 24.0, -12.0);
+            return &patternDashLineX2;
+        }
         break;
 
-    case RS2::DashDotLine:
-        return &patternDashDotLine;
+    case RS2::DashDotLine: {
+            static RS_LineTypePattern patternDashDotLine(4, 12.0, -5.95, 0.1, -5.95);
+            return &patternDashDotLine;
+        }
         break;
-    case RS2::DashDotLine2:
-        return &patternDashDotLine2;
+    case RS2::DashDotLine2: {
+            static RS_LineTypePattern patternDashDotLine2(4, 6.0, -2.95, 0.1, -2.95);
+            return &patternDashDotLine2;
+        }
         break;
-    case RS2::DashDotLineX2:
-        return &patternDashDotLineX2;
+    case RS2::DashDotLineX2: {
+            static RS_LineTypePattern patternDashDotLineX2(4, 24.0, -11.95, 0.1, -11.95);
+            return &patternDashDotLineX2;
+        }
         break;
 
-    case RS2::DivideLine:
-        return &patternDivideLine;
+    case RS2::DivideLine: {
+            static RS_LineTypePattern patternDivideLine(6, 12.0, -5.9, 0.15, -5.9, 0.15, -5.9);
+            return &patternDivideLine;
+        }
         break;
-    case RS2::DivideLine2:
-        return &patternDivideLine2;
+    case RS2::DivideLine2: {
+            static RS_LineTypePattern patternDivideLine2(6, 6.0, -2.9, 0.15, -2.9, 0.15, -2.9);
+            return &patternDivideLine2;
+        }
         break;
-    case RS2::DivideLineX2:
-        return &patternDivideLineX2;
+    case RS2::DivideLineX2: {
+            static RS_LineTypePattern patternDivideLineX2(6, 24.0, -11.9, 0.15, -11.9, 0.15, -11.9);
+            return &patternDivideLineX2;
+        }
         break;
 
-    case RS2::CenterLine:
-        return &patternCenterLine;
+    case RS2::CenterLine: {
+            static RS_LineTypePattern patternCenterLine(4, 32.0, -6.0, 6.0, -6.0);
+            return &patternCenterLine;
+        }
         break;
-    case RS2::CenterLine2:
-        return &patternCenterLine2;
+    case RS2::CenterLine2: {
+            static RS_LineTypePattern patternCenterLine2(4, 16.0, -3.0, 3.0, -3.0);
+            return &patternCenterLine2;
+        }
         break;
-    case RS2::CenterLineX2:
-        return &patternCenterLineX2;
+    case RS2::CenterLineX2: {
+            static RS_LineTypePattern patternCenterLineX2(4, 64.0, -12.0, 12.0, -12.0);
+            return &patternCenterLineX2;
+        }
         break;
 
-    case RS2::BorderLine:
-        return &patternBorderLine;
+    case RS2::BorderLine: {
+            static RS_LineTypePattern patternBorderLine(6, 12.0, -6.0, 12.0, -5.95, 0.1, -5.95);
+            return &patternBorderLine;
+        }
         break;
-    case RS2::BorderLine2:
-        return &patternBorderLine2;
+    case RS2::BorderLine2: {
+            static RS_LineTypePattern patternBorderLine2(6, 6.0, -3.0, 6.0, -2.95, 0.1, -2.95);
+            return &patternBorderLine2;
+        }
         break;
-    case RS2::BorderLineX2:
-        return &patternBorderLineX2;
+    case RS2::BorderLineX2: {
+            static RS_LineTypePattern patternBorderLineX2(6, 24.0, -12.0, 24.0, -11.95, 0.1, -11.95);
+            return &patternBorderLineX2;
+        }
         break;
 
-    case RS2::LineByLayer:
-        return &patternBlockLine;
+    case RS2::LineByLayer: {
+            static RS_LineTypePattern patternBlockLine(2, 0.5, -0.5);
+            return &patternBlockLine;
+        }
         break;
-    case RS2::LineByBlock:
-        return &patternBlockLine;
+    case RS2::LineByBlock: {
+            static RS_LineTypePattern patternBlockLine(2, 0.5, -0.5);
+            return &patternBlockLine;
+        }
         break;
     default:
         break;
